#include "HeightMap.h"


HeightMap::HeightMap(size_t i_size_x, size_t i_size_y):
  m_size_x(i_size_x),
  m_size_y(i_size_y),
  m_map(std::vector<double>(i_size_x * i_size_y, 0.0)){};


/// Getter and setter for a single height map point
double HeightMap::Get(size_t i_x, size_t i_y) const
  {
  return m_map.at(i_x + i_y * m_size_x);
  };

void HeightMap::Set(size_t i_x, size_t i_y, double i_value)
  {
  m_map.at(i_x + i_y * m_size_x) = i_value;
  };

/// Getters for height map dimensions
size_t HeightMap::GetSizeX() const
  {
  return m_size_x;
  };
size_t HeightMap::GetSizeY() const
  {
  return m_size_y;
  };